<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');
require_once 'Excel/reader.php';

class Excel{

	function read_file($filename){

		

		$data = new Spreadsheet_Excel_Reader();
		$data->setOutputEncoding('utf8');
                $path=(realpath('.').'/files/'.$filename);
                //echo $path;
                //echo realpath('.');
		$data->read($path);

		$datos = $data->sheets[0]['cells'];	

		//The results are sending as an array.
		//Los resultados son enviados como un arreglo.
		return $datos;
	}

}
